﻿using Newtonsoft.Json;
using SqlSugar;

namespace AdminBase.Model.Entitys
{
    /// <summary>
    /// 权限表
    /// </summary>
    public class Permissions : EntityCommon
    {
        /// <summary>
        /// 权限标识
        /// </summary>
        [JsonProperty("sign")]
        [SugarColumn(IsNullable = false)]
        public string Sign { get; set; }

        /// <summary>
        /// 名称
        /// </summary>
        [JsonProperty("name")]
        public string Name { get; set; }

        /// <summary>
        /// 是否是菜单
        /// </summary>
        [JsonProperty("isMenu")]
        public bool? IsMenu { get; set; } = false;

        /// <summary>
        /// 方法：POST/GET/PUT/DELETE
        /// </summary>
        [JsonProperty("method")]
        public string? Method { get; set; }

        /// <summary>
        /// 路由路径
        /// </summary>
        [JsonProperty("path")]
        public string? Path { get; set; }

        /// <summary>
        /// 图标
        /// </summary>
        [JsonProperty("icon")]
        public string? Icon { get; set; }

        /// <summary>
        /// 排序
        /// </summary>
        [JsonProperty("sort")]
        public int? Sort { get; set; }

        /// <summary>
        /// 描述
        /// </summary>
        [JsonProperty("description")]
        public string? Description { get; set; }

        /// <summary>
        /// 父级ID
        /// </summary>
        [JsonProperty("parentID")]
        public long? ParentID { get; set; }
    }
}
